/**
 * 
 */
package controlador;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Div;
import org.zkoss.zul.Menuitem;
import org.zkoss.zul.Window;

/**
 * @author Administrador
 *
 */
public class IndexControlador extends GenericForwardComposer {

	private Div menulateral;
	private Div pantallas;
	private Window win;


	public Window getWin() {
		return win;
	}

	public void setWin(Window win) {
		this.win = win;
	}

	/**
	*
	*
	*/
	@Override
	public void doAfterCompose(Component comp)throws Exception{
		super.doAfterCompose(comp);
		// TODO Auto-generated method stub
		win.setAttribute(comp.getId(), this);
	
	}
		
	public void limpiar() {
		menulateral.getChildren().clear();
		pantallas.getChildren().clear();
	}

	public void menu (String mnulateral){
		limpiar();
		execution.createComponents(mnulateral, menulateral, null);
	}
	
	public void pantalla (String mnulateral,String formulario){
		
		limpiar();
		menu(mnulateral);
		execution.createComponents(formulario, pantallas, null);
	}

}
